<?php
//Incluimos nosso arquivo de configuração
require_once('config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <!--[if gt IE 8]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <![endif]-->
    <title>Wikee Company | Sistema de Gerenciamento</title>
    <link rel="icon" type="image/ico" href="favicon.ico"/>

    <link href="<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/css/stylesheets.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 7]>
        <link href="css/ie.css" rel="stylesheet" type="text/css" />
        <script type='text/javascript' src='js/plugins/other/lte-ie7.js'></script>
    <![endif]-->
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jquery/jquery-1.9.1.min.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jquery/jquery-ui-1.10.1.custom.min.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jquery/jquery-migrate-1.1.1.min.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jquery/globalize.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/other/excanvas.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/other/jquery.mousewheel.min.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/bootstrap/bootstrap.min.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/cookies/jquery.cookies.2.2.0.min.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jflot/jquery.flot.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jflot/jquery.flot.stack.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jflot/jquery.flot.pie.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/jflot/jquery.flot.resize.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/epiechart/jquery.easy-pie-chart.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/sparklines/jquery.sparkline.min.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js'></script>

    <script type='text/javascript' src="<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/uniform/jquery.uniform.min.js"></script>

    <script type='text/javascript' src="<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/fullcalendar/fullcalendar.min.js"></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/shbrush/XRegExp.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/shbrush/shCore.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/shbrush/shBrushXml.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/shbrush/shBrushJScript.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/shbrush/shBrushCss.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/charts.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/actions.js'></script>

    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/cleditor/jquery.cleditor.js'></script>
    <script type='text/javascript' src='<?php echo THEME_DIR.DS.THEME_NOME_DIR ;?>/js/plugins/ckeditor/ckeditor.js'></script>
</head>
<body>
    <div id="loader"><img src="img/loader.gif"/></div>
    <div class="wrapper">

        <div class="sidebar">

            <div class="top">
                <a href="index.php" class="logo"></a>

                <!-- div class="search">
                    <div class="input-prepend">
                        <span class="add-on orange"><span class="icon-search icon-white"></span></span>
                        <input type="text" placeholder="search..."/>
                    </div>
                </div -->
            </div>
            <div class="nContainer">

                <ul class="navigation">
                    <li class="active"><a href="index.php" class="blblue">Dashboard</a></li>
                    <li>
                        <a href="#" class="blyellow">Tickets</a>
                        <div class="open"></div>
                        <ul>
                            <li><a href="?pag=ticket&status=todos">Todos os Tickets</a></li>
                            <li><a href="?pag=ticket&status=aberto">Tickets em Aberto</a></li>
                            <li><a href="?pag=ticket&status=respondido">Tickets Respondidos</a></li>
                            <li><a href="?pag=ticket&status=replicado">Tickets Replicados</a></li>
                            <li><a href="?pag=ticket&status=fechado">Tickets Fechados</a></li>
                            <li><a href="?pag=assunto">Assuntos</a></li>
                            <!--li><a href="buttons.html">Buttons</a></li>
                            <li><a href="icons.html">Icons</a></li>
                            <li><a href="grid_sys.html">Grid System</a></li-->
                        </ul>
                    </li>
                    <li>
                        <a href="#" class="blgreen">Configurações</a>
                        <div class="open"></div>
                        <ul>
                            <li><a href="?pag=modulos">Módulos</a></li>
                            <li><a href="?pag=perfil">Perfil</a></li>
                            <li><a href="?pag=sites">Sites</a></li>
                            <li><a href="?pag=usuarios">Usuários</a></li>

                        </ul>
                    </li>
                    <!-- li><a href="statistic.html" class="blred">Statistic</a></li>
                    <li>
                        <a href="#" class="bldblue">Tables</a>
                        <div class="open"></div>
                        <ul>
                            <li><a href="tables.html">Simple</a></li>
                            <li><a href="tables_dynamic.html">Dynamic</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="#" class="blpurple">Samples</a>
                        <div class="open"></div>
                        <ul>
                            <li><a href="faq.html">FAQ</a></li>
                            <li><a href="invoice.html">Invoice</a></li>
                            <li><a href="mailbox.html">Mailbox</a></li>
                            <li><a href="login.html">Login</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="#" class="blorange">Other</a>
                        <div class="open"></div>
                        <ul>
                            <li><a href="files.html">File handling</a></li>
                            <li><a href="images.html">Images</a></li>
                            <li><a href="typography.html">Typography</a></li>
                            <li><a href="404.html">Error 404</a></li>
                        </ul>
                    </li>
                </ul -->
                <a class="close">
                    <span class="ico-remove"></span>
                </a>
            </div>
            <div class="widget">
                <div class="datepicker"></div>
            </div>

        </div>

        <div class="body">

            <!--ul class="navigation">
                <li>
                    <a href="index.php" class="button">
                        <div class="icon">
                            <span class="ico-monitor"></span>
                        </div>
                        <div class="name">Dashboard</div>
                    </a>
                </li>
                <li>
                    <a href="#" class="button yellow">
                        <div class="arrow"></div>
                        <div class="icon">
                            <span class="ico-cog-2"></span>
                        </div>
                        <div class="name">Tickets</div>
                    </a>
                    <ul class="sub">
                        <li><a href="?pag=ticket">Visualizar Tickets</a></li>
                        <li><a href="?pag=assunto">Assuntos</a></li>
                        <!-- li><a href="buttons.html">Buttons</a></li>
                        <li><a href="icons.html">Icons</a></li>
                        <li><a href="grid_system.html">Grid System</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="button green">
                        <div class="arrow"></div>
                        <div class="icon">
                            <span class="ico-pen-2"></span>
                        </div>
                        <div class="name">Forms Stuff</div>
                    </a>
                    <ul class="sub">
                        <li><a href="forms.html">Elements</a></li>
                        <li><a href="validation.html">Validation</a></li>
                        <li><a href="grid.html">Grid</a></li>
                        <li><a href="editor.html">Editors</a></li>
                        <li><a href="wizard.html">Wizard</a></li>
                    </ul>
                </li>
                <li>
                    <a href="statistic.html" class="button red">
                        <div class="icon">
                            <span class="ico-chart-4"></span>
                        </div>
                        <div class="name">Statistic</div>
                    </a>
                </li>
                <li>
                    <a href="#" class="button dblue">
                        <div class="arrow"></div>
                        <div class="icon">
                            <span class="ico-layout-7"></span>
                        </div>
                        <div class="name">Tables</div>
                    </a>
                    <ul class="sub">
                        <li><a href="tables.html">Simple</a></li>
                        <li><a href="tables_dynamic.html">Dynamic</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="button purple">
                        <div class="arrow"></div>
                        <div class="icon">
                            <span class="ico-box"></span>
                        </div>
                        <div class="name">Samples</div>
                    </a>
                    <ul class="sub">
                        <li><a href="faq.html">FAQ</a></li>
                        <li><a href="invoice.html">Invoice</a></li>
                        <li><a href="mailbox.html">Mailbox</a></li>
                        <li><a href="login.html">Login</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="button orange">
                        <div class="arrow"></div>
                        <div class="icon">
                            <span class="ico-cloud"></span>
                        </div>
                        <div class="name">Other</div>
                    </a>
                    <ul class="sub">
                        <li><a href="files.html">File handling</a></li>
                        <li><a href="images.html">Images</a></li>
                        <li><a href="typography.html">Typography</a></li>
                        <li><a href="404.html">Error 404</a></li>
                    </ul>
                </li>
                <li>
                    <div class="user">
                        <!-- img src="img/examples/users/dmitry_m.jpg" align="left"/>
                        <a href="#" class="name">
                            <span><?php echo $_SESSION['usuario'][1]; ?></span>
                            <span class="sm">Administrator</span>
                        </a>
                    </div>
                    <div class="buttons">
                        <div class="sbutton green navButton">
                            <a href="#"><span class="ico-align-justify"></span></a>
                        </div>
                        <div class="sbutton blue">
                            <a href="#"><span class="ico-cogs"></span></a>
                            <div class="popup">
                                <div class="arrow"></div>
                                <div class="row-fluid">
                                    <div class="row-form">
                                        <div class="span12"><strong>SETTINGS</strong></div>
                                    </div>
                                    <div class="row-form">
                                        <div class="span4">Navigation:</div>
                                        <div class="span8"><input type="radio" class="cNav" name="cNavButton" value="default"/> Default <input type="radio" class="cNav" name="cNavButton" value="bordered"/> Bordered</div>
                                    </div>
                                    <div class="row-form">
                                        <div class="span4">Content:</div>
                                        <div class="span8"><input type="radio" class="cCont" name="cContent" value=""/> Responsive <input type="radio" class="cCont" name="cContent" value="fixed"/> Fixed</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul -->


            <div class="content">
<p>&nbsp;</p>
                <div class="page-header">
                    <div class="icon">
                        <span class="ico-arrow-right"></span>
                    </div>

                    <h1>Dashboard <small>Sistema de Gerenciamento</small></h1>
                    <ul class="navigation">
                       <div class="user">
                        <!-- img src="img/examples/users/dmitry_m.jpg" align="left"/ -->


                        <a href="<?php echo $_SERVER['PHP_SELF'];?>?pag=login&acao=logout" class="name">
                            <span><?php echo $_SESSION['usuario'][1]; ?></span>
                            <!-- span class="sm">Administrator</span -->
                            <span class="sm">


                            </span>
                        </a>

                    </div>
                    <!--div class="buttons">
                        <div class="sbutton green navButton">
                            <a href="#"><span class="ico-align-justify"></span></a>
                        </div>
                        <div class="sbutton blue">
                            <a href="#"><span class="ico-cogs"></span></a>
                            <div class="popup">
                                <div class="arrow"></div>
                                <div class="row-fluid">
                                    <div class="row-form">
                                        <div class="span12"><strong>SETTINGS</strong></div>
                                    </div>
                                    <div class="row-form">

                                            <div class="span4"><button class="btn btn-primary"><span class="icon-user icon-white"></span></button></div>
                                            <div class="span8"><a href="<?php echo $_SERVER['PHP_SELF'];?>?pag=login&acao=logout" class="btn btn-danger" ><span class="icon-off icon-white"></span></a></div>

                                    </div>
                                    <!--div class="row-form">
                                        <div class="span4">Content:</div>
                                        <div class="span8"><input type="radio" class="cCont" name="cContent" value=""/> Responsive <input type="radio" class="cCont" name="cContent" value="fixed"/> Fixed</div>
                                    </div >
                                </div>
                            </div>
                        </div>
                    </div -->
                </li>
            </ul>
                </div>

                <div class="row-fluid">
                    <?php
	//Verifica se foi passada alguma pagina via get
	//Ex: localhost/index.php?pag=admin
	if(isset($_GET['pag']))
	{
		//montagem de uma página nova exemplo: admin
		// /controllers/admin.php  (classe "admin")
		// /views/admin.php

		if(file_exists(CONTROLLERS_DIR.DS.$_GET['pag']. '.php'))
		{
			//caso exista o arquivo vamos inclui-lo
			require_once(CONTROLLERS_DIR.DS.$_GET['pag']. '.php');

			//Agora vamos incluir nosso arquivo de visualiza��o
			//seguindo a mesma l�gica, verificamos se o arquivo
			//existe e caso exista inclua ele
			//Lembrando nossa regra de conven��o
			// /views/admin/admin.php

			//Mas precisamos verificar tamb�m se existe uma a��o
			//onde a conven��o �
			//Exemplo se fossemos acessar m�dulo inserir do admin
			//pag=admin&acao=inserir
			//Logo seriam carregados os arquivos
			// /views/admin/inserir.php
			//e se nenhuma ação fosse passada
			// /views/admin/admin.php
			//Vamos verificar se a acao foi passada

			if(isset($_GET['acao']))
			{
				//agora verificamos se o arquivo solicitado na ação existe
				if(file_exists(VIEWS_DIR.DS.$_GET['pag'].DS.$_GET['acao']. '.php'))
				{
					//caso exista o arquivo vamos inclui-lo
					require_once(VIEWS_DIR.DS.$_GET['pag'].DS.$_GET['acao']. '.php');
				}
				//Caso não exista a ação
				else
				{
					echo 'Arquivo de ação não encontrado =(';
				}
			}
			else
			{
				//Agora que já verificamos se existe um controlador e/ou uma a��o, caso n�o existe
				//uma a��o ent�o carregamos nosso arquivo de visualiza��o que possui o mesmo nome
				//do controlador, porque isso?
				//porque se j� carregamos um visualizador na a��o, n�o tem porque carregar novamente
				//ent�o primeiro verificamos se tem uma a��o que carrega o visualizador dela
				//caso n�o exista ent�o carregamos o arquivo de visualiza��o padrao da nossa conven��o
				if(file_exists(VIEWS_DIR.DS.$_GET['pag'].DS.$_GET['pag']. '.php'))
				{
					//caso exista o arquivo vamos inclui-lo
					require_once(VIEWS_DIR.DS.$_GET['pag'].DS.$_GET['pag']. '.php');
				}
				//Caso n�o exista a view
				else
				{
					echo 'Arquivo de visualiza��o n�o encontrado =(';
				}
			}
		}

	}
	//Caso n�o seja passado o $_GET['pag']
	else
	{

            ?>

                    <div class="span7">

                        <div class="block">
                            <div class="head">
                                <div class="icon"><span class="ico-chart-4"></span></div>
                                <h2>Estatística de Atendimento em <?php echo date('d/m/Y');?></h2>
                                <!-- ul class="buttons">
                                    <li><a href="#" class="ublock"><div class="icon"><span class="ico-undo"></span></div></a></li>
                                    <li><a href="#" class="cblock"><div class="icon"><span class="ico-sort"></span></div></a></li>
                                </ul -->
                            </div>
                            <div class="data">
                                <div id="main_chart" style="height: 300px;"></div>
                            </div>
                            <div class="row-fluid">
                                <div class="span4">
                                    <div class="stat">
                                        <span class="cdblue">2,350</span> Tickets<br/> Abertos
                                    </div>
                                </div>
                                <div class="span4">
                                    <div class="stat">
                                        <span class="cblue">1,120</span> Tickets<br/> Resolvidos
                                    </div>
                                </div>
                                <div class="span4">
                                    <div class="stat">
                                        <span class="corange">720</span> Tickets<br/> Cancelados
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!--div class="block">
                            <div class="data-fluid">
                                <div id="main_calendar"></div>
                            </div>
                        </div -->

                    </div>

                    <div class="span5">

                        <div class="block">
                            <div class="head">
                                <div class="icon"><span class="ico-tag"></span></div>
                                <h2>Últimos Tickets</h2>
                                <!-- ul class="buttons">
                                    <li><a href="#" onClick="source('tickets'); return false;"><div class="icon"><span class="ico-info"></span></div></a></li>
                                    <li><a href="#" class="ublock"><div class="icon"><span class="ico-undo"></span></div></a></li>
                                    <li><a href="#" class="cblock"><div class="icon"><span class="ico-sort"></span></div></a></li>
                                </ul -->
                            </div>
                            <div class="data-fluid">
                                <table width="100%" class="table tickets">

                                    <?php

                                    $tick = ticket_dash::ListaTodos();

                                    foreach ($tick['dados'] as $ts)
                                   {

                                         if($ts[8]=='Aberto'){
                                                $abefec='class="bl_green"';
                                                $span = 'class="label label-success"';
                                            }elseif($ts[8]=='Fechado'){
                                                $abefec='class="bl_red"';
                                                 $span = 'class="label label-important"';
                                            }elseif($ts[8]=='Replicado'){
                                                $abefec='class="bl_blue"';
                                                 $span = 'class="label label-info"';
                                            }elseif($ts[8]=='Respondido'){
                                                $abefec='class="bl_green"';
                                                 $span = 'class="label label-warning"';
                                            }else{
                                                $abefec="";
                                            }


                                    ?>
                                    <tr>
                                        <td width="55" <?php echo $abefec;?>><a href="?pag=ticket&acao=ver&cod=<?php echo $ts['ticket_id'];?>"><span <?php echo $span;?>><?php echo $ts['ticket_protocolo'];?></span></a></td>
                                        <td width="80"><?php echo ticket_dash::MostraSite($ts['ticket_site']);?></td>
                                        <td><a href="#" class="cblue"><?php echo ticket_dash::AssuntoTitulo($ts[6]);?> </a></td>
                                    </tr>
                                    <?php
                                    }

                                    ?>

                                    <!--tr>
                                        <td class="bl_blue"><span class="label label-info">new</span></td>
                                        <td>#AA-216 <span class="mark">22/02/2013</span></td>
                                        <td><a href="#" class="cblue">Go to shop and buy beer!</a> <span class="mark">Added by Dmitry Ivaniuk</span></td>
                                    </tr>
                                    <tr>
                                        <td class="bl_green"><span class="label label-success">done</span></td>
                                        <td>#AC-857 <span class="mark">21/02/2013</span></td>
                                        <td><a href="#" class="cgreen">Buy on themeforest this great template...</a> <span class="mark">Added by Dmitry Ivaniuk</span></td>
                                    </tr>
                                    <tr>
                                        <td class="bl_red"><span class="label label-important">removed</span></td>
                                        <td>#VB-57 <span class="mark">20/02/2013</span></td>
                                        <td><a href="#" class="cred">Buy something for my dog...</a> <span class="mark">Added by Dmitry Ivaniuk</span></td>
                                    </tr>
                                    <tr>
                                        <td class="bl_red"><span class="label label-important">removed</span></td>
                                        <td>#VB-44 <span class="mark">20/02/2013</span></td>
                                        <td><a href="#" class="cred">Buy something for my dog...</a> <span class="mark">Added by Dmitry Ivaniuk</span></td>
                                    </tr>

                                    <tr>
                                        <td class="bl_green"><span class="label label-success">done</span></td>
                                        <td>#AA-216 <span class="mark">22/02/2013</span></td>
                                        <td><a href="#" class="cgreen">Go to shop and buy beer!</a> <span class="mark">Added by Dmitry Ivaniuk</span></td>
                                    </tr>
                                    <tr>
                                        <td class="bl_red"><span class="label label-important">removed</span></td>
                                        <td>#VB-31 <span class="mark">21/02/2013</span></td>
                                        <td><a href="#" class="cred">Buy on themeforest this great template...</a> <span class="mark">Added by Dmitry Ivaniuk</span></td>
                                    </tr -->

                                </table>

                            </div>
                        </div>

                        <!--div class="widgets">

                            <a href="#" class="swidget blue">
                                <div class="icon">
                                    <span class="ico-box"></span>
                                </div>
                                <div class="bottom">
                                    <div class="text">Products</div>
                                </div>
                            </a>

                            <a href="#" class="swidget green">
                                <div class="epc mini">
                                    <span class="epcm-green" data-percent="81">81%</span>
                                </div>
                                <div class="bottom">
                                    <div class="text">Statistic</div>
                                </div>
                            </a>

                            <a href="#" class="swidget orange">
                                <div class="icon">
                                    <span class="ico-info"></span>
                                </div>
                                <div class="bottom">
                                    <div class="text">Info</div>
                                    <div class="value">2,312</div>
                                </div>
                            </a>

                        </div>

                        <!-- div class="block">
                            <div class="head dblue">
                                <h2>Messages</h2>
                                <ul class="buttons">
                                    <li><a href="#" onClick="source('messages'); return false;"><div class="icon"><span class="ico-info"></span></div></a></li>
                                    <li><a href="#" class="ublock"><div class="icon"><span class="ico-undo"></span></div></a></li>
                                    <li><a href="#" class="cblock"><div class="icon"><span class="ico-sort"></span></div></a></li>
                                </ul>
                            </div>
                            <div class="data dark npr npb">
                                <div class="messages scroll" style="height: 200px;">
                                    <div class="item blue">
                                        <div class="arrow"></div>
                                        <div class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ut diam quis dolor mollis tristique. Suspendisse vestibulum convallis felis vitae facilisis. Praesent eu nisi vestibulum erat.</div>
                                        <div class="date">09.02., 21:04</div>
                                    </div>
                                    <div class="item dblue out">
                                        <div class="arrow"></div>
                                        <div class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ut diam quis dolor mollis tristique. Suspendisse vestibulum convallis felis vitae facilisis. Praesent eu nisi vestibulum erat.</div>
                                        <div class="date">09.02., 21:02</div>
                                    </div>
                                    <div class="item blue">
                                        <div class="arrow"></div>
                                        <div class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ut diam quis dolor mollis tristique. Suspendisse vestibulum convallis felis vitae facilisis. Praesent eu nisi vestibulum erat.</div>
                                        <div class="date">09.02., 20:55</div>
                                    </div>
                                </div>
                            </div>
                            <div class="toolbar dark">
                                <div class="input-prepend input-append">
                                    <span class="add-on dblue"><span class="icon-envelope icon-white"></span></span>
                                    <input type="text"/>
                                    <button class="btn dblue" type="button">Send  <span class="icon-arrow-next icon-white"></span></button>
                                </div>
                            </div>
                        </div -->

                    </div>

                </div>
 <?php
                }
	?>
            </div>


        </div>

    </div>

    <div class="dialog" id="source" style="display: none;" title="Source"></div>

    <!--div id="fcAddEvent" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="fcAddEventLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="fcAddEventLabel">Add new event</h3>
        </div>
        <div class="modal-body">
            <div class="row-fluid">
                <div class="span3">Title:</div>
                <div class="span9"><input type="text" id="fcAddEventTitle"/></div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" id="fcAddEventButton">Add</button>
        </div>
    </div -->
<script>

        var ckeditor = CKEDITOR.replace('ckeditor');

        CKEDITOR.disableAutoInline = true;
        CKEDITOR.inline('editable');

    </script>
</body>
</html>
